﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using AEM.Controls;

namespace AEM
{
    /// <summary>
    /// HallCallLog.xaml 的交互逻辑
    /// </summary>
    public partial class HallCallLog : Window
    {
        public HallCallLog()
        {
            InitializeComponent();
            this.TitleBar.MouseLeftButtonDown+=new MouseButtonEventHandler(TitleBar_MouseLeftButtonDown);
            this.btn_statusratio.Click += new RoutedEventHandler(btn_statusratio_Click);
            this.btn_waitingratio.Click += new RoutedEventHandler(btn_waitingratio_Click);
            this.btn_updownratio.Click += new RoutedEventHandler(btn_updownratio_Click);
            this.btn_hallcallratio.Click += new RoutedEventHandler(btn_hallcallratio_Click);
            this.btn_hallcalllog.Click += new RoutedEventHandler(btn_hallcalllog_Click);
            this.btn_runtime.Click += new RoutedEventHandler(btn_runtime_Click);
        }

        void btn_runtime_Click(object sender, RoutedEventArgs e)
        {
            this.ratio_ship.Children.Clear();
            this.ratio_ship.Children.Add(new RunTime());
        }


        void btn_statusratio_Click(object sender, RoutedEventArgs e)
        {
            this.ratio_ship.Children.Clear();
            this.ratio_ship.Children.Add(new StatusRatio());
        }

        void btn_waitingratio_Click(object sender, RoutedEventArgs e)
        {
            this.ratio_ship.Children.Clear();
            this.ratio_ship.Children.Add(new WaitingRatio());
        }

        void btn_updownratio_Click(object sender, RoutedEventArgs e)
        {
            this.ratio_ship.Children.Clear();
            this.ratio_ship.Children.Add(new UpDownRatio());
        }

        void btn_hallcallratio_Click(object sender, RoutedEventArgs e)
        {
            this.ratio_ship.Children.Clear();
            this.ratio_ship.Children.Add(new HallCallRatio());
        }

        void btn_hallcalllog_Click(object sender, RoutedEventArgs e)
        {
            this.ratio_ship.Children.Clear();
            this.ratio_ship.Children.Add(new Controls.HallCallLog());
        }



        void TitleBar_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.DragMove();
        }

        private void sys_button_close_Click(object sender, RoutedEventArgs e)
        {
            this.Close();
        }

        private void sys_button_min_Click(object sender, RoutedEventArgs e)
        {
            this.WindowState = WindowState.Minimized;
        }
    }
}
